<?php
namespace app\index\validate;

use think\Validate;

class Article extends Validate{

    protected $rule = [
        ['title','require|min:2','标题必须填写|长度大于2'],
        ['indate','date','必须为日期格式'],
        ['info','require','内容信息不能为空'],
        ['nums','number|checkNum:1','必须为数字|数字大于1']
    ];


    protected function checkNum($value,$rule){
        if($value >= 2){
            return true;
        }
        return '不对吆数字';
    }




}
?>